﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FtpLibDotNet
{
    internal class FtpResponse
    {
        public string Response { get; set; }
        public int Code { get { return Int32.Parse(this.Response.Substring(0, 3)); } }
        public string Data { get { return this.Response.Length > 3 ? this.Response.Substring(4) : String.Empty; } }

        public static implicit operator FtpResponse(string data)
        {
            return new FtpResponse() { Response = data };
        }
    }
}
